//
//  MyButton.m
//  04UI-HomeWork
//
//  Created by 冀永金 on 16/7/19.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "MyButton.h"

@implementation MyButton
- (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image {
    self = [super initWithFrame:frame];
    if (self) {
        [self setImage:image forState:UIControlStateNormal];
        //self.imageView.image = image;
    }
    return self;
}
+ (instancetype)buttonWithFrame:(CGRect)frame image:(UIImage *)image {
    return [[MyButton alloc]initWithFrame:frame image:image];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
